import com.dmotiko.bolacua.*
import com.dmotiko.general.*

class NewItem
extends BaseClip {
	
	private var txtTitle:TextField;
	private var txtDescription:TextField;
	private var txtSeparator:TextField;
	
	private function NewItem(){
		super();
	}
	
	private function initClip(){
		txtTitle.autoSize = "left";
		txtDescription.autoSize = "left";
		txtTitle.text = "";
		txtDescription.text = "";
		txtSeparator._visible = false;
	}
	
	public function showSeparator(b):Void {
		txtSeparator._visible = b;
	}
	
	public function refreshData(){
		txtTitle.text = data.title.toUpperCase();
		txtDescription.text = data.content;
		
		txtSeparator._y = txtDescription._y + txtDescription._height;
	}
	
	public function onRelease(){
		if(this.data.link && this.data.link.length > 0){
			getURL("javascript:popup('"+this.data.link+"', '"+this.data.width+"', '"+this.data.height+"');");
		}
		
	}
	
}